import pygame

class Pieces():
    def __init__(self,x,y,id):
        self.id = id
        self.site = (x,y)
        self.rect = pygame.Rect(0,0,20,20)
        self.rect.topleft = (40*x+10,40*y+10)
        self.color = (230,0,0) if (id == 1) else (0,230,0)

    def update(self,screen):
        pygame.draw.rect(screen,self.color,self.rect)